import request from '@/utils/request'

export default {
  getPostDetailById(id) {
    return request({
      url: `/post/${id}`,
      method: 'get'
    })
  },
  followUser(id) {
    return request({
      url: `/user_follows/${id}`,
      method: 'get'
    })
  },
  unfollowUser(id) {
    return request({
      url: `/user_unfollow/${id}`,
      method: 'get'
    })
  },
  postLike(id) {
    return request({
      url: `/post_like/${id}`,
      method: 'get'
    })
  },
  getPostComment(id, pageSize) {
    return request({
      url: `/post_comment/${id}`,
      method: 'get',
      params: {
        pageSize
      }
    })
  },
  pushPostComment(id, content, parent_id) {
    return request({
      url: `/post_comment/${id}`,
      method: 'post',
      data: {
        content,
        parent_id
      }
    })
  }
}
